﻿/*
 *	交易页主控
 */

$(document).ready(function () {
    umtr_hoveritem();  //鼠标经过item

    umtr_hovernew_rtr_statebar_div();
    umtr_hover_rtr_tradeadd_div();
});


///数据


//鼠标经过item
function umtr_hoveritem() {
   $(".rtr_tradelistitem_div").die().live("mouseover", function (e) {
//        $(this).next().css("box-shadow", "4px -4px 4px #252");
        $(this).parent().next().find(".rtr_tradelistitem_div").css("box-shadow", "4px -4px 4px #252");

        $(this).css("box-shadow", "4px -4px 4px #252");

        $(".tradeadd_manage_span").css("visibility", "hidden");
        $(".create_rtr_statebar_div").remove();
        $(this).parent().prepend("<div  class='create_rtr_statebar_div'><div  class='rtr_statebar_div' "
                                     + "style='position:relative; margin-top:5px;'>"
                                     + "<ul>"
                                     + "<li class='rtr_row_tradeid'>交易编号<span class='trade_manage_span' ><a class='trade_alter_a'></a><a class='trade_delete_a'></a><a class='trade_recover_a'></a></span></li>"
                                     + "<li class='rtr_row_tradetime'>时间</li>"
                                     + "<li class='rtr_row_tradename'>产品名</li>"
                                     + "<li class='rtr_row_tradesum'>数量(/件)</li>"
                                     + "<li class='rtr_row_tradeprice'>单价(/元)</li>"
                                     + "<li class='rtr_row_tradeaccount'>总额(/元)</li>"
                                     + "<li class='rtr_row_tradecustom'>客户</li>"
                                     + "<div class='rtr_row_tradedescript'>备注</div>"
                                     + "</ul>"
                                  + "</div></div>");
    });
    $(".rtr_tradelistitem_div").live("mouseout", function (e) {
        $(this).parent().next().find(".rtr_tradelistitem_div").css("box-shadow", "4px -4px 4px transparent");
        $(this).css("box-shadow", "4px -4px 4px transparent");

    });

}


function umtr_hovernew_rtr_statebar_div() {
    $(".rtr_tradeadd_div").live("mouseover", function (e) {
        $(".create_rtr_statebar_div").remove();
    });
}

function umtr_hover_rtr_tradeadd_div() {
    $(".rtr_tradeadd_div").mouseover(function (e) {
        $(".tradeadd_manage_span").css("visibility", "visible");
    });
    $(".rtr_tradeadd_div").mouseout(function (e) {
    });
}